<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<!doctype html>
<html>
<head>
<title></title>
<style>
@IMPORT url("/static/base.css");
</style>
</head>

<body>
	<%@ include file="header.jsp"%>

	<h1>All User</h1>



	<table class='grid'>

		<tr>
			<td>name</td>
			<td>status</td>
			<td>login id</td>

			<td>card name</td>
			<td>card number</td>
			<td>card type</td>

			<td>options</td>
		</tr>

		<c:forEach items="${userList}" var="user">
			<tr>
				<td>${fn:escapeXml(user.name)}</td>
				<td>${user.suspended ? "Suspenced" :"Active"}</td>
				<td>${fn:escapeXml(user.loginId)}</td>

				<td>${fn:escapeXml(user.cardName)}</td>
				<td>${fn:escapeXml(user.cardNumber)}</td>
				<td>${fn:escapeXml(user.cardType)}</td>
				<td>
					<form action="/service/admin/ChangeUserStatus" method="post">
						<input type='hidden' name='userId' value='${user.id}' /> <input
							type='hidden' name='suspend' value='${!user.suspended}' /> <input
							type='submit' value='${user.suspended ? "activate" :"suspend"}' />
					</form>
				</td>
			</tr>
		</c:forEach>
	</table>

</body>
</html>